# -*- coding: utf-8 -*-

import os

config_path = os.path.abspath(os.path.dirname(__file__))


class Config:
    DIALECT = "mysql"
    DRIVER = "models"
    USERNAME = "root"
    PASSWORD = "dicky870302"
    HOST = "115.159.49.112"
    PORT = 5547
    DBNAME = "wechat"

    # SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL","sqlite:///" + os.path.join(config_path,"meiriyitu.db"))
    # SQLALCHEMY_DATABASE_URI = "mysql+pymysql://username:password@hostname/database"
    SQLALCHEMY_DATABASE_URI = "mysql://{}:{}@{}:{}/{}?charset=utf8".format(USERNAME, PASSWORD, HOST, PORT, DBNAME)
    SQLALCHEMY_TRACK_MODIFICATIONS = True